package com.jicheng.mapper;

import com.jicheng.dto.data.IntegrityListParams;
import com.jicheng.dto.data.profile.CadreInformationInfo;
import com.jicheng.dto.integrity.CadreInformationDto;
import com.jicheng.dto.integrity.IntegrityListDto;
import com.jicheng.entity.CadreInformation;
import com.jicheng.framework.mybatis.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CadreInformationMapper extends BaseMapper<CadreInformation> {
    CadreInformationDto getCadreInformation(@Param("reportId") String reportId, @Param("cadreId") String cadreId, @Param("appId") String appId);


    List<IntegrityListDto> getIntegrityList(@Param("integrityListParams") IntegrityListParams integrityListParams);

    @Select("select count(1) from cadre_information where id = #{cadreId}")
    int isExist(@Param("cadreId") String cadreId);
}